﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DiscoveryLogic.Workflows.Components.Markov.MaxEnt
{
    /// <summary>
    /// A interface for objects which can deliver a stream of training data to be
    /// supplied to an ITrainingEventReader. It is not necessary to use a ITrainingDataReader in a
    /// SharpEntropy application, but it can be used to support a wider variety of formats
    /// in which your training data can be held.
    /// </summary>
    public interface ITrainingDataReader<T>
    {
        /// <summary> 
        /// Returns the next slice of data held in this ITrainingDataReader.
        /// </summary>
        /// <returns>
        /// the object representing the data which is next in this
        /// ITrainingDataReader
        /// </returns>
        T NextToken();

        /// <summary> 
        /// Test whether there are any training data items remaining in this ITrainingDataReader.
        /// </summary>
        /// <returns>
        /// true if this ITrainingDataReader has more data tokens
        /// </returns>
        bool HasNext();
    }
}
